3.6.15 \(\int \cos ^3(c+d x) (a+b \tan (c+d x)) \, dx\) [515]

Optimal. Leaf size=44 \[ -\frac {b \cos ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d} \]

[Out]

-1/3*b*cos(d*x+c)^3/d+a*sin(d*x+c)/d-1/3*a*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3567, 2713} \begin {gather*} -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}-\frac {b \cos ^3(c+d x)}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Tan[c + d*x]),x]

[Out]

-1/3*(b*Cos[c + d*x]^3)/d + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d)

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rubi steps

\begin {align*} \int \cos ^3(c+d x) (a+b \tan (c+d x)) \, dx &=-\frac {b \cos ^3(c+d x)}{3 d}+a \int \cos ^3(c+d x) \, dx\\ &=-\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=-\frac {b \cos ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 44, normalized size = 1.00 \begin {gather*} -\frac {b \cos ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Tan[c + d*x]),x]

[Out]

-1/3*(b*Cos[c + d*x]^3)/d + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 36, normalized size = 0.82

method result size
derivativedivides \(\frac {\frac {a \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3}-\frac {b \left (\cos ^{3}\left (d x +c \right )\right )}{3}}{d}\) \(36\)
default \(\frac {\frac {a \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3}-\frac {b \left (\cos ^{3}\left (d x +c \right )\right )}{3}}{d}\) \(36\)
risch \(-\frac {b \cos \left (d x +c \right )}{4 d}+\frac {3 a \sin \left (d x +c \right )}{4 d}-\frac {b \cos \left (3 d x +3 c \right )}{12 d}+\frac {a \sin \left (3 d x +3 c \right )}{12 d}\) \(56\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/3*a*(cos(d*x+c)^2+2)*sin(d*x+c)-1/3*b*cos(d*x+c)^3)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 35, normalized size = 0.80 \begin {gather*} -\frac {b \cos \left (d x + c\right )^{3} + {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/3*(b*cos(d*x + c)^3 + (sin(d*x + c)^3 - 3*sin(d*x + c))*a)/d

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 38, normalized size = 0.86 \begin {gather*} -\frac {b \cos \left (d x + c\right )^{3} - {\left (a \cos \left (d x + c\right )^{2} + 2 \, a\right )} \sin \left (d x + c\right )}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/3*(b*cos(d*x + c)^3 - (a*cos(d*x + c)^2 + 2*a)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 11886 vs. \(2 (40) = 80\).
time = 2.52, size = 11886, normalized size = 270.14 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/96*(3*pi*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2
*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2
 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^6 + 3*pi*b*sgn(tan(1/2*d*x)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*tan(1/2*d*x)*tan(1/2*c)^2
- tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^4 + 9*pi*b*sgn(tan(1/2*d*x)^2*
tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x
)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d
*x)^4*tan(1/2*c)^6 + 9*pi*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - t
an(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2
 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^4*tan(1/2*c)^6 + 6*pi*b*tan(1/2*d*x)^6*tan(1/2*c)^6 - 6*b*a
rctan((tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) - tan(1/2*c) + 1)/(tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) + tan(
1/2*c) + 1))*tan(1/2*d*x)^6*tan(1/2*c)^6 - 6*b*arctan((tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) + tan(1/2*c) + 1
)/(tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) - tan(1/2*c) + 1))*tan(1/2*d*x)^6*tan(1/2*c)^6 + 6*b*arctan((tan(1/2
*d*x)*tan(1/2*c) + tan(1/2*d*x) + tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1))*t
an(1/2*d*x)^6*tan(1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2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*t
an(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 +
 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^2 + 9*pi*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*t
an(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)
*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^2 + 27*pi*b*sgn(
tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*
sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x)
 - 1)*tan(1/2*d*x)^4*tan(1/2*c)^4 + 27*pi*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + ta
n(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*c)^2
- tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^4*tan(1/2*c)^4 + 18*pi*b*tan(1/2*d*x)^6*tan
(1/2*c)^4 - 18*b*arctan((tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) - tan(1/2*c) + 1)/(tan(1/2*d*x)*tan(1/2*c) - t
an(1/2*d*x) + tan(1/2*c) + 1))*tan(1/2*d*x)^6*tan(1/2*c)^4 - 18*b*arctan((tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*
x) + tan(1/2*c) + 1)/(tan(1/2*d*x)*tan(1/2*c) +...

________________________________________________________________________________________

Mupad [B]
time = 3.76, size = 47, normalized size = 1.07 \begin {gather*} \frac {2\,a\,\sin \left (c+d\,x\right )}{3\,d}-\frac {b\,{\cos \left (c+d\,x\right )}^3}{3\,d}+\frac {a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3*(a + b*tan(c + d*x)),x)

[Out]

(2*a*sin(c + d*x))/(3*d) - (b*cos(c + d*x)^3)/(3*d) + (a*cos(c + d*x)^2*sin(c + d*x))/(3*d)

________________________________________________________________________________________